package com.lj.back.manage.scaffold.module.job.DTO;

import com.lj.back.manage.scaffold.common.annotation.valid.EnumCheck;
import com.lj.back.manage.scaffold.module.job.enums.ScheduleStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 定时任务操作对象
 * @author lv
 * @version 1.0.0
 */
@Data
@ApiModel("定时任务操作对象")
public class ScheduleJobOperate {
    /**
     * 任务id
     */
    @ApiModelProperty(value = "定时任务ID",example = "123451",required = true)
    @NotNull(message = "{schedule.job.id.notnull}")
    private Long id;


    /**
     * 任务状态
     */
    @ApiModelProperty(value = "变更状态",example = "1正常  2暂停",required = true)
    @NotNull(message = "{schedule.job.status.notnull}")
    @EnumCheck(enumClass = ScheduleStatusEnum.class, message = "{schedule.job.status.invalid}")
    private String status;
}
